load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")
load("@fbcode_macros//build_defs/lib:re_test_utils.bzl", "re_test_utils")

oncall("fbcode_entropy_wardens_folly")

cpp_unittest(
    name = "CodecTest",
    srcs = ["CodecTest.cpp"],
    remote_execution = re_test_utils.remote_execution_linux_default(),
    deps = [
        ":codec_test_utils",
        "//folly/portability:gtest",
        "//wangle/codec:fixed_length_frame_decoder",
        "//wangle/codec:length_field_based_frame_decoder",
        "//wangle/codec:length_field_prepender",
        "//wangle/codec:line_based_frame_decoder",
    ],
)

cpp_library(
    name = "codec_test_utils",
    headers = ["CodecTestUtils.h"],
    exported_deps = [
        "//folly:function",
        "//folly/io:iobuf",
        "//wangle/channel:handler",
    ],
)
